import React from 'react';
import Header from '../../components/header';
import { fetchMe } from '../../actions'
import { connect } from 'react-redux'
import R from 'ramda'

function mapDispatchToProps (dispatch){
    return {
        fetchMe: () => dispatch(fetchMe())
    }
}



class Page extends React.Component {
    componentWillMount () {
        this.props.fetchMe();
    }
    render () {
        return (
            <div id="container">
                <Header></Header>
                {this.props.children}
            </div>
        );
    }
}

export default connect(R.identity, mapDispatchToProps)(Page)
